<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <button onclick="func1()">点我！</button>
</body>
</html>
<script>
var globalVar1 = 0
const func1 = () => {
    globalVar1 = 1
    func2()
    alert(globalVar1)
    // return globalVar1
}
const func2 = () => {
    console.trace()
    globalVar1 = 2
}
</script>